<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>员工管理</title>
<link href="css/table.css" rel="stylesheet" type="text/css">
<link href="css/button.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="js/delete.js"></script>
</head>
<body>
<section><a href="logout">注销</a>&nbsp;&nbsp;您现在的位置：<a href="admin.jsp">首页</a>
&gt;&gt;<a href="salary.jsp">员工管理</a></section>
<table class="altrowstable" id="alternatecolor" style="margin:auto">
<caption>员工信息表</caption>
	<tr>
		<th>员工编号</th>
		<th>员工姓名</th>
		<th>性别</th>
		<th>部门名称</th>
		<th>岗位</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${list}" var="staff">
		<tr>
			<td>${staff.staffSno}</td>
			<td>${staff.name}</td>
			<td>${staff.sex}</td>
			<td>${staff.departmentName}</td>
			<td>${staff.post}</td>
			<td>
			
				<a href="/salary_manage/staff?method=delete&id=${staff.staffSno}"onclick="javascript:return todel()" >删除</a>
				<a href="/salary_manage/staff?method=findById&id=${staff.staffSno}">修改</a>
				<%--修改分为2步：先根据id在servlet中找到那个学生，找到后把此学生的信息传到update.jsp页面--%> 
			</td>
		</tr>
	</c:forEach>
</table>
<section class="demo">
<div class="demo_con">
<button type="button" class="button blue rarrow" onclick="window.location.href = '/salary_manage/staff?method=add'">添加员工</button>
<br/>
<button type="button" class="button blue larrow" onclick="window.location.href = 'admin.jsp'">返回首页</button>
</div>
</section>
</body>
</html>